package com.waylau.spring.cloud.weather.config;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;


@Configuration
public class RestConfiguration {
	private final static Logger logger = LoggerFactory.getLogger(RestConfiguration.class);
	
	@Autowired
	private RestTemplateBuilder builder;

	@Bean
	public RestTemplate restTemplate() {
		logger.info("Weather Data Sync Job.builder！");

		return builder.build();
	}
	
}
